import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


class GridItemWidget extends StatefulWidget {
  const GridItemWidget({super.key, required this.title, required this.data,this.titleIcon, required this.unit});

  final String title;
  final String data;
  final String unit;
  final Widget ? titleIcon;
  @override
  State<GridItemWidget> createState() => _GridItemWidgetState();
}

class _GridItemWidgetState extends State<GridItemWidget> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.zero,
      child:  Wrap(
      // mainAxisAlignment: MainAxisAlignment.center,
      // crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Text(widget.title,style: TextStyle(fontSize: 14),),
        SizedBox(height: 5,),
        Row(
          children: [
            Text(widget.data,style: TextStyle(fontSize: 18,fontWeight: FontWeight.bold,color: Colors.blue),),
            SizedBox(width: 5,),
            Text(widget.unit,style: TextStyle(fontSize: 12),)
          ],)
      ],
    ),);
  }
}
